<!--
 * @Description: 表格测试
 * @Author: 郑灶欣
 * @Date: 2021-12-17 14:39:25
 * @LastEditors: 郑灶欣
 * @LastEditTime: 2021-12-17 15:38:20
 * @FilePath: \vue3-admin\src\views\table\index.vue
-->
<template>
    <div>
        <a-table row-key="name" :columns="columns" :data="data" :row-selection="rowSelection" />
    </div>
</template>

<script>

    export default {
        data() {
            return {
                rowSelection: {
                    type: 'checkbox',
                    showCheckedAll: true
                },
                columns: [
                    {
                        title: 'Name',
                        dataIndex: 'name',
                    },
                    {
                        title: 'Salary',
                        dataIndex: 'salary',
                    },
                    {
                        title: 'Address',
                        dataIndex: 'address',
                    },
                    {
                        title: 'Email',
                        dataIndex: 'email',
                    },
                ],
                data: [{
                    key: '1',
                    name: 'Jane Doe',
                    salary: 23000,
                    address: '32 Park Road, London',
                    email: 'jane.doe@example.com'
                }, {
                    key: '2',
                    name: 'Alisa Ross',
                    salary: 25000,
                    address: '35 Park Road, London',
                    email: 'alisa.ross@example.com'
                }, {
                    key: '3',
                    name: 'Kevin Sandra',
                    salary: 22000,
                    address: '31 Park Road, London',
                    email: 'kevin.sandra@example.com',
                    disabled: true
                }, {
                    key: '4',
                    name: 'Ed Hellen',
                    salary: 17000,
                    address: '42 Park Road, London',
                    email: 'ed.hellen@example.com'
                }, {
                    key: '5',
                    name: 'William Smith',
                    salary: 27000,
                    address: '62 Park Road, London',
                    email: 'william.smith@example.com'
                }]
            }
        }
    };
</script>

<style lang="scss" scoped>

</style>